package com.candy.candyshortlink.config;

import com.gitee.candy.number.SnowflakeIdGenerator;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author suYanLong
 * @version 1.0
 * @date 2023/6/1 15:58
 * @Description 全局id配置
 */
@Configuration
public class GlobalIdConfig {

    @Bean
    public SnowflakeIdGenerator snowflakeIdGenerator() {
        return new SnowflakeIdGenerator(2L, 1L);
    }

}
